package com.lagou;

import com.lagou.server.NettyServer;
import com.lagou.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class ServerBoot implements CommandLineRunner {

    @Autowired
    NettyServer nettyServer;
    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(ServerBoot.class, args);

    }

    @Override
    public void run(String... args) throws Exception {
        nettyServer.startServer("127.0.0.1",8999);
    }
}
